package com.springsecirtytest.activiti1.util;

import io.swagger.models.auth.In;
import org.springframework.validation.ObjectError;

public class AjaxResponse {
    private Integer status;
    private String msg;
    private  Object object;

    public AjaxResponse(int i, String msg) {
        this.status=i;
        this.msg=msg;
    }

    public static AjaxResponse ajaxData(Integer status, String msg, Object object){
        return  new AjaxResponse( status,msg,object);
    }

   private AjaxResponse(Integer status, String msg, Object object) {
        this.status = status;
        this.msg = msg;
        this.object = object;
    }

    public static AjaxResponse Success(Object a){
        return new AjaxResponse(200,"success",a);
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }
}
